<?php
include 'home.php';
include 'sub/header.tpl';
include 'sub/slider.tpl';
?>

<div class="bigbox">
    <h1><?php echo fl('Student_handbook') ?></h1>
    <div>
        <div class="colums">
            <h3><a href="entry?cid=1"><?php echo fl('Visa_information') ?></a></h3>
            <?php
            $visafrow = Db::getOneRow('*', 'article', 'type=1 order by id DESC');
            if (Lang::getCode() == 'en') {
                echo '<img src="upload/' . $visafrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $visafrow['id'] . '">' . $visafrow['title2'] . '</a>
                        <span id="intro">' . $visafrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            } else {
                echo '<img src="upload/' . $visafrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $visafrow['id'] . '">' . $visafrow['title'] . '</a>
                        <span id="intro">' . $visafrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            }
            $visarows = Db::getRows('*', 'article', 'type=1 order by id DESC limit 1, 3');
            foreach ($visarows as $visarow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $visarow['id'] . '">' . $visarow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $visarow['id'] . '">' . $visarow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=2"><?php echo fl('Student_stories') ?></a></h3>
            <?php
            $storyfrow = Db::getOneRow('*', 'article', 'type=2 order by id DESC');

            if (Lang::getCode() == 'en') {
                echo '<img src="upload/' . $storyfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $storyfrow['id'] . '">' . $storyfrow['title2'] . '</a>
                        <span id="intro">' . $storyfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            } else {
                echo '<img src="upload/' . $storyfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $storyfrow['id'] . '">' . $storyfrow['title'] . '</a>
                        <span id="intro">' . $storyfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            }
            $storyrows = Db::getRows('*', 'article', 'type=2 order by id DESC limit 1, 3');
            foreach ($storyrows as $storyrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $storyrow['id'] . '">' . $storyrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $storyrow['id'] . '">' . $storyrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=3"><?php echo fl('Study_FAQ') ?></a></h3>
            <?php
            $faqfrow = Db::getOneRow('*', 'article', 'type=3 order by id DESC');

            if (Lang::getCode() == 'en') {
                echo '<img src="upload/' . $faqfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $faqfrow['id'] . '">' . $faqfrow['title2'] . '</a>
                        <span id="intro">' . $faqfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            } else {
                echo '<img src="upload/' . $faqfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clpink" href="entrycontent?id=' . $faqfrow['id'] . '">' . $faqfrow['title'] . '</a>
                        <span id="intro">' . $faqfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            }
            $faqrows = Db::getRows('*', 'article', 'type=3 order by id DESC limit 1, 3');
            foreach ($faqrows as $faqrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $faqrow['id'] . '">' . $faqrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $faqrow['id'] . '">' . $faqrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="clear"></div>
    </div>
</div>
<div class="bigbox">
    <h1><?php echo fl('Study') ?></h1>
    <div>
        <div class="colums">
            <h3><a href="entry?cid=9&lv=1"><?php echo fl('Secondary') ?></a></h3>
            <?php
            $thfrow = Db::getOneRow('*', 'article', 'type=9 and level = 1 order by id DESC');
            if (Lang::getCode() == 'en') {
                echo '<img src="upload/' . $thfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $thfrow['id'] . '">' . $thfrow['title2'] . '</a>
                        <span id="intro">' . $thfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            } else {
                echo '<img src="upload/' . $thfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $thfrow['id'] . '">' . $thfrow['title'] . '</a>
                        <span id="intro">' . $thfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            }
            $throws = Db::getRows('*', 'article', 'type=9 and level = 1 order by id DESC limit 1, 3');
            foreach ($throws as $throw) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $throw['id'] . '">' . $throw['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $throw['id'] . '">' . $throw['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=9&lv=2"><?php echo fl('College') ?></a></h3>
            <?php
            $cdfrow = Db::getOneRow('*', 'article', 'type=9 and level = 2 order by id DESC');
            if (Lang::getCode() == 'en') {
                    echo '<img src="upload/' . $cdfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $cdfrow['id'] . '">' . $cdfrow['title2'] . '</a>
                        <span id="intro">' . $cdfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                } else {
                    echo '<img src="upload/' . $cdfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $cdfrow['id'] . '">' . $cdfrow['title'] . '</a>
                        <span id="intro">' . $cdfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                }
            $cdrows = Db::getRows('*', 'article', 'type=9 and level = 2 order by id DESC limit 1, 3');
            foreach ($cdrows as $cdrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $cdrow['id'] . '">' . $cdrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $cdrow['id'] . '">' . $cdrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=9&lv=3"><?php echo fl('University') ?>-<?php echo fl('Postgraduate') ?></a></h3>
            <?php
            $dhfrow = Db::getOneRow('*', 'article', 'type=9 and level = 3 order by id DESC');

            if (Lang::getCode() == 'en') {
                    echo '<img src="upload/' . $dhfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $dhfrow['id'] . '">' . $dhfrow['title2'] . '</a>
                        <span id="intro">' . $dhfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                } else {
                    echo '<img src="upload/' . $dhfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title" href="entrycontent?id=' . $dhfrow['id'] . '">' . $dhfrow['title'] . '</a>
                        <span id="intro">' . $dhfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                }
            $dhrows = Db::getRows('*', 'article', 'type=9 and level = 3 order by id DESC limit 1, 3');
            foreach ($dhrows as $dhrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $dhrow['id'] . '">' . $dhrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $dhrow['id'] . '">' . $dhrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="clear"></div>
    </div>
</div>
<div class="bigbox">
    <h1><?php echo fl('Scholarships') ?></h1>
    <div>
        <?php
            $hbrows = Db::getRows('*', 'article', 'type=7 order by id DESC limit 0,3');
            foreach ($hbrows as $hbrow) {
                if (Lang::getCode() == 'en') {
                    echo '<div class="colums"><br/>
                        <img src="upload/' . $hbrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clgreen" href="entrycontent?id=' . $hbrow['id'] . '">' . $hbrow['title2'] . '</a>
                        <span id="intro">' . $hbrow['intro2'] . '</span>
                      </div>';
                } else {
                    echo '<div class="colums"><br/>
                        <img src="upload/' . $hbrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clgreen" href="entrycontent?id=' . $hbrow['id'] . '">' . $hbrow['title'] . '</a>
                        <span id="intro">' . $hbrow['intro'] . '</span>
                      </div>';
                }
            }
        ?>
            <div class="clear"></div>
        </div>
    </div>
    <div class="bigbox">
        <h1><?php echo fl('Support_Services') ?></h1>
        <div>
            <div class="colums">
                <h3><a href="entry?cid=4"><?php echo fl('Language_learning') ?></a></h3>
            <?php
            $langfrow = Db::getOneRow('*', 'article', 'type=4 order by id DESC');
            if (Lang::getCode() == 'en') {
                echo '<img src="upload/' . $langfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $langfrow['id'] . '">' . $langfrow['title2'] . '</a>
                        <span id="intro">' . $langfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            } else {
                echo '<img src="upload/' . $langfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $langfrow['id'] . '">' . $langfrow['title'] . '</a>
                        <span id="intro">' . $langfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
            }

            $langrows = Db::getRows('*', 'article', 'type=4 order by id DESC limit 1, 3');
            foreach ($langrows as $langrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $langrow['id'] . '">' . $langrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $langrow['id'] . '">' . $langrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=5"><?php echo fl('Financial_Loans') ?></a></h3>
            <?php
            $fnfrow = Db::getOneRow('*', 'article', 'type=5 order by id DESC');

            if (Lang::getCode() == 'en') {
                    echo '<img src="upload/' . $fnfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $fnfrow['id'] . '">' . $fnfrow['title2'] . '</a>
                        <span id="intro">' . $fnfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                } else {
                    echo '<img src="upload/' . $fnfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $fnfrow['id'] . '">' . $fnfrow['title'] . '</a>
                        <span id="intro">' . $fnfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                }
            $fnrows = Db::getRows('*', 'article', 'type=5 order by id DESC limit 1, 3');
            foreach ($fnrows as $fnrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $fnrow['id'] . '">' . $fnrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $fnrow['id'] . '">' . $fnrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="colums">
            <h3><a href="entry?cid=6"><?php echo fl('Air_tickets') ?></a></h3>
            <?php
            $ticketfrow = Db::getOneRow('*', 'article', 'type=6 order by id DESC');

            if (Lang::getCode() == 'en') {
                    echo '<img src="upload/' . $ticketfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $ticketfrow['id'] . '">' . $ticketfrow['title2'] . '</a>
                        <span id="intro">' . $ticketfrow['intro2'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                } else {
                    echo '<img src="upload/' . $ticketfrow['img'] . '" width="190" height="112"/>
                        <a class="entry_title clblue" href="entrycontent?id=' . $ticketfrow['id'] . '">' . $ticketfrow['title'] . '</a>
                        <span id="intro">' . $ticketfrow['intro'] . '</span>
                        <span class="more" href="?">MORE:</span>
                        ';
                }
            $ticketrows = Db::getRows('*', 'article', 'type=6 order by id DESC limit 1, 3');
            foreach ($ticketrows as $ticketfrow) {
                if (Lang::getCode() == 'en') {
                    echo '<a class="relate" href="entrycontent?id=' . $ticketfrow['id'] . '">' . $ticketfrow['title2'] . '</a>';
                } else {
                    echo '<a class="relate" href="entrycontent?id=' . $ticketfrow['id'] . '">' . $ticketfrow['title'] . '</a>';
                }
            }
            ?>
        </div>
        <div class="clear"></div>
    </div>
</div>
<?php include 'sub/footer.tpl'; ?>